<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019-10-09
 * Time: 15:47
 */

namespace App\Models;


class UserWithDraw extends BaseModel
{
    /**
     * 与模型关联的数据表
     *
     * @var string
     */
    protected $table = 'user_withdraw';

    /**
     * 主键
     * @var string
     */
    protected $primaryKey = 'id';

    /**
     * 需要被转换成日期的属性。
     *
     * @var array
     */
    protected $dates = ['createTime', 'updateTime'];

    /**
     * @var array
     */
    protected $hidden = ['deleted_at'];

    /**
     * @var array
     */
    protected $guarded = ['id'];

    /**
     * 充值用户
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function user()
    {
        return $this->belongsTo(User::class, 'userId', 'id');
    }
}
